<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@page import="java.util.Date"%>
<%@page import="java.text.SimpleDateFormat"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@include file="/common/common.jspf"%>
<script type="text/javascript" src="${ctx}/js/mater_purcha/mater_purcha_add.js"></script>
<style type="text/css">
.col-sm-3 {
	width: 15%;
	float: left;
}

.col-sm-9 {
	width: 85%;
	float: left;
}

label[class^="btn btn-default"] {
	margin-top: -4px;
}
</style>
<script type="text/javascript" src="${ctx}/js/jedate/jedate.js"></script>
</head>
<body>
	<div class="l_err" style="width: 100%; margin-top: 2px;"></div>
	<form id="form" name="form" class="form-horizontal" method="post"
		action="${ctx}/purcha/pur_addEntity.shtml">
		<input type="hidden" class="form-control checkacc" value="${before.id}"
			name="purchaseFromMap.id" id="id">
		<section class="panel panel-default">
			<div class="panel-body">
				<div class="form-group">
					<label class="col-sm-3 control-label">申请部门：</label>
					<div class="col-sm-9">
					<select  class="form-control" id="client" name="purchaseFromMap.departmentId">
							<c:forEach var="key" items="${dep}" >
								<option value="${key.id}" ${key.id==before.departmentId?'selected':'' }>${key.name }</option>	
							</c:forEach>
						</select>
					</div>
				</div>
				<div class="line line-dashed line-lg pull-in"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label">采购单号：</label>
					<div class="col-sm-9">
						<input type="text" class="form-control checkabh"
							 name="purchaseFromMap.purchaseNo" />
					</div>
				</div>
				<div class="line line-dashed line-lg pull-in"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label">日期：</label>
					<div class="col-sm-9">
						<input type="text" class="form-control" id="receiving_date" placeholder="请输入接单日期" 
							name="purchaseFromMap.tranDate"  value="${before.tranDate }">
							
					</div>
				</div>
				<div class="line line-dashed line-lg pull-in"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label">推荐供应商：</label>
					<div class="col-sm-9">
						<select  class="form-control" id="client" name="purchaseFromMap.recomTuiId">
							<c:forEach var="key" items="${supp}" >
								<option value="${key.id}" ${key.id==before.recomTuiId?'selected':'' }>${key.suppName }</option>	
							</c:forEach>
						</select>
					</div>
				</div>
				<div class="line line-dashed line-lg pull-in"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label">实际供应商：</label>
					<div class="col-sm-9">
						<select  class="form-control" id="client" name="purchaseFromMap.recomShiId">
							<c:forEach var="key" items="${supp}" >
								<option value="${key.id}" ${key.id==before.recomShiId?'selected':'' }>${key.suppName }</option>	
							</c:forEach>
						</select>
					</div>
				</div>.
				<div class="line line-dashed ....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... pull-in"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label">物料编码：</label>
					<div class="col-sm-9">
						<input type="text" class="form-control" placeholder="请输入排产重量" required
							name="purchaseFromMap.materialNo"  value="${before.materialNo}"/>
					</div>
				</div>
				<div class="line line-dashed line-lg pull-in"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label">名称：</label>
					<div class="col-sm-9">
						<input type="text" class="form-control" id="" placeholder="请输入名称"
							name="purchaseFromMap.productName"  value="${before.productName }"/>
					</div>
				</div>
				<div class="line line-dashed line-lg pull-in"></div>
				<div class="line line-dashed line-lg pull-in"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label">型号：</label>
					<div class="col-sm-9">
						<select  class="form-control" id="client">
							<c:forEach var="key" items="${brand}" >
								<c:if test="${before.materials_id!=key.id }">
								<option value="${key.id }" }>${key.name }</option>	
								</c:if>
							</c:forEach>
						</select>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label">规格型号：</label>
					<div class="col-sm-9">
						<select  class="form-control" id="client" name="purchaseFromMap.materials_id">
							<c:forEach var="key" items="${Model}" >
								<option value="${key.id}" ${key.id==before.materials_id?'selected':'' }>${key.name }</option>	
							</c:forEach>
						</select>
					</div>
				</div>
				<div class="line line-dashed line-lg pull-in"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label">单位：</label>
					<div class="col-sm-9">
					<input type="text" class="form-control" placeholder="请输入采购订单号"
							name="purchaseFromMap.unit" value="${before.unit}"/>
					</div>
				</div>
				<div class="line line-dashed line-lg pull-in"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label">数量：</label>
					<div class="col-sm-9">
					<input type="text" class="form-control" id="count" placeholder="请输入数量"
							name="purchaseFromMap.count" value="${before.count}"/>
					</div>
				</div>
				<div class="line line-dashed line-lg pull-in"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label">单价：</label>
					<div class="col-sm-9">
					 <input type="text" class="form-control" id="unitPrice" placeholder="请输入出货日期" 
							name="purchaseFromMap.unitPrice" value="${before.unitPrice}"/>
					 </div>
				</div>
				<div class="line line-dashed line-lg pull-in"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label">总价：</label>
					<div class="col-sm-9">
					<input type="text" class="form-control" id="total"  placeholder="请输入定价方式"
							name="purchaseFromMap.total" value="${before.total}"/>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label">品质：</label>
					<div class="col-sm-9">
					<select  class="form-control" id="client" name="purchaseFromMap.qualityId">
							<c:forEach var="key" items="${quality}" >
								<option value="${key.id}" ${key.id==before.qualityId?'selected':'' }>${key.quality }</option>	
							</c:forEach>
						</select>
					</div>
				</div>
				<div class="line line-dashed line-lg pull-in"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label">备注：</label>
					<div class="col-sm-9">
					<input type="text" class="form-control" placeholder="请输入作业号"
							name="purchaseFromMap.remark" value="${before.remark}"/>
					</div>
				</div>
				<div class="line line-dashed line-lg pull-in"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label">发货日期：</label>
					<div class="col-sm-9">
					<input type="text"id="dateinfo" class="form-control" placeholder="请输入发货日期" 
							name="purchaseFromMap.purchaseaStartDate" value="${before.purchaseaStartDate}">
					</div>
				</div>
				<div class="line line-dashed line-lg pull-in"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label">到货日期：</label>
					<div class="col-sm-9">
						<input type="text" class="form-control" id="shipping_time" placeholder="请输入到货日期" 
							name="purchaseFromMap.purchaseaEndDate" value="${before.purchaseaEndDate}"/>
					</div>
				</div>

		</div>
		<footer class="panel-footer text-right bg-light lter">
		<button type="submit" class="btn btn-success btn-s-xs">提交</button>
		</footer> </section>
	</form>
	<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/lq.datetimepick.css" />
	<script src="${pageContext.request.contextPath}/js/jquery.js" type="text/javascript"></script>
	<script src='${pageContext.request.contextPath}/js/selectUi.js' type='text/javascript'></script>
	<script src='${pageContext.request.contextPath}/js/lq.datetimepick.js' type='text/javascript'></script>
	<script type="text/javascript">
		$(function() {
		$("#datetimepicker1").on("click", function(e) {
			e.stopPropagation();
			$(this).lqdatetimepicker({
				css : 'datetime-day',
				dateType : 'D',
				selectback : function() {
				}
			});
		});
	});	
</script>
	
<script type="text/javascript">
jeDate({
	dateCell:"#receiving_date",
	format:"YYYY-MM-DD hh:mm:ss",
	isinitVal:false,
	isTime:true, 
	isClear:false,
	minDate:"2014-09-19 00:00:00"
})
jeDate({
	dateCell:"#dateinfo",
	format:"YYYY-MM-DD hh:mm:ss",
	isinitVal:false,
	isTime:true, 
	isClear:false,
	minDate:"2014-09-19 00:00:00"
})
jeDate({
	dateCell:"#shipping_time",
	format:"YYYY-MM-DD hh:mm:ss",
	isinitVal:false,
	isTime:true, 
	isClear:false,
	minDate:"2014-09-19 00:00:00"
})
jeDate({
	dateCell:"#production_date",
	format:"YYYY-MM-DD hh:mm:ss",
	isinitVal:false,
	isTime:true, 
	isClear:false,
	minDate:"2014-09-19 00:00:00"
})
</script>
<script type="text/javascript">
//总价随着商品的数量改变而改变
$(function() {
		$("#count").change(function() {
			var unitPrice = $("#unitPrice").val();
			var count = $("#count").val();
			var total = $("#total").val();
			$("#total").val(unitPrice*count);
		});
		
		$("#unitPrice").change(function() {
			var unitPrice = $("#unitPrice").val();
			var count = $("#count").val();
			var total = $("#total").val();
			$("#total").val(unitPrice*count);
		});
		
	});
</script>
</body>
>>>>>>> branch 'master' of git@47.106.35.231:yangfei/ty-project.git
</html>
